<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>用户中心_{$web_name}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="Keywords" content="用户中心" />
		<meta name="Description" content="用户中心" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
		<meta name="format-detection" content="telephone=no">
		<tc_include file="Public:head" />
		<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/User/css/user.css" />
		<link rel="stylesheet" type="text/css" href="/themes/wnsc/Home/User/css/user_common.css" />
		
	</head>

	<body>

		<tc_include file="Public:nav" />
		<div class="w990" id="content" style="background: none;">
			<div class="margin-w1210 clearfix">
				<div class="w">
					<div class="breadcrumb clearfix">
						<a href="/" class="index">首页</a> <span class="crumbs-arrow">&gt;</span> <span class="last">用户中心</span></div>
				</div>
				<div class="blank"></div>
				<tc_include file="Public:user_left" />
				<div class="user-right">
					<div class="box">
						<div class="tabmenu">
							<ul class="tab pngFix">
								<li class="first active">代言红包</li>
							</ul>
						</div>
						<div class="alert alert-success">
							<h4>操作提示：</h4>
							<ul>
								<li>您可查看您推广代言订单状态以及代言红包</li>
							</ul>
						</div>
						<style type="text/css">
							.user-right .tabmenu{margin-bottom: 0;}
							.goods_image{width: 17%;height: 50px;float: left;}
							.goods_name2{float: left; width: 80%;height: 50px;line-height: 50px;overflow: hidden;margin-left: 1%;}
						</style>
						<notempty name="rs">
						<div>
							<table width="100%" border="0" cellspacing="0" cellpadding="0" class="bought-table">
								<thead>
									<tr class="col-name">
										<th width="35%" style="border-left: 1px solid #E6E6E6;">商品名称</th>
										<th width="15%">用户</th>
										<th width="15%">下单时间</th>
										<th width="15%">状态</th>
										<th width="18%" style="border-right: 1px solid #E6E6E6;">代言红包</th>
									</tr>
								</thead>
								<tbody class="close-order" id="list_address">
									<foreach name="rs" item="v">
									<tr class="order-bd last">
										<td align="center" class="baobei no-border-right order_goods_info">
											<div class="last"><img class="goods_image" src="{$v.goods_image}"/><p class="goods_name2">{$v.goods_name}</p></div>
										</td>
										<td align="center" class="baobei no-border-right order_goods_info">
											<div class="last">{$v.buyer_name}</div>
										</td>
										<td align="center" class="baobei no-border-right order_goods_info">
											<div class="last">{:date('Y-m-d H:i:s',$v['add_time'])}</div>
										</td>
										<td align="center" class="baobei no-border-right order_goods_info">
											<div class="last">
											<php>if($v['refund_state']==0){</php>
												<eq name="v.order_state" value="0">已取消</eq>
												<eq name="v.order_state" value="10">未付款</eq>
												<eq name="v.order_state" value="20">已发货</eq>
												<eq name="v.order_state" value="30">已发货</eq>
												<eq name="v.order_state" value="40">
													<eq name="v.lock_state" value="0">
														已收货
													</eq>
													<eq name="v.lock_state" value="1">
														已入账
													</eq>
												</eq>
											<php>}else{</php>
												<eq name="v.refund_state" value="1">申请退款</eq>
												<eq name="v.refund_state" value="2">同意退款</eq>
												<eq name="v.refund_state" value="3">拒绝退款</eq>
												<eq name="v.refund_state" value="4">退款完成</eq>
											<php>}</php>
											</div>
										</td>
										<td align="center" class="baobei no-border-right order_goods_info" style="color: red;line-height: 25px;">
											<php>if($v['recommend_type']==0){</php>
											¥{$v.recommend_price}
											<php>
											}else{
												$shop_info=get_shop_info($v['recommend_shop_id']);
											</php>
												礼品：{$shop_info.title}*{$v['recommend_shop_num']}<br/>
												<php>if($v['recommend_orderid']){</php>
													<a href="{:U('user/order_info',array('id'=>$v['recommend_orderid']))}" style="background: #e7ba91;color: #fff;padding: 2px 5px;">已领取</a>									
												<php>}else{</php>
													<php>if($v['order_state']<20){</php>
														<a href="javascript:;" onclick="javaScript:alert('该推荐用户还未付款，不能领取。')" style="background: #eee;padding: 2px 12px;">领取</a>
													<php>}else{</php>
														<a href="{:U('pay/lipin',array('rec_id'=>$v['rec_id'],'recommend_shop_id'=>$v['recommend_shop_id'],'recommend_shop_num'=>$v['recommend_shop_num']))}" style="background: #eee;padding: 2px 12px;">领取</a>
													<php>}</php>
												<php>}</php>
										<php>}</php>
										</td>
									</tr>
									</foreach>
								</tbody>
							</table>
						</div>
						
						<div class="blank10"></div>
						<div id="pagination" class="page">
							<div class="page-wrap fr">
								<div class="total">共<span id="totalcount">{$count}</span>条</div>
							</div>
							<style>
							.page-num .next {margin-left:0 ;}
							.page-num a{ float: left;text-align: center;border: 1px solid #eee;height: 35px;line-height: 35px;margin-right:4px;}
							.page-num span{float: left; text-align: center; height: 37px; line-height: 37px; width: 37px; margin-right:4px; background: red; color: #fff;}
							</style>
							<div class="page-num fr">
								{$page}
							</div>
						</div>
						</notempty>
						<empty name="rs">
							<style>
							/*空记录的展示*/
							.tip-box{ width: 1000px; height: 300px; margin: 50px auto 0; text-align: center;}
							.tip-box .tip-icon{ display: block; max-width: 100%; max-height: 100%; margin: 0 auto;}
							.tip-box .tip-text{ line-height: 20px; padding: 10px; font-size: 14px;}
							.tip-box .tip-text p{ height: 40px; line-height: 40px;}

							</style>
							<div class="tip-box">
								<img src="/themes/wnsc/Home/List/images/noresult.png" class="tip-icon">
								<div class="tip-text">没有符合条件的记录</div>
							</div>
						</empty>
					</div>
					
					
				</div>

			</div>
		</div>
		<div style="clear: both;"></div>

		<tc_include file="Public:footer" />

	</body>

</html>